/**
 * 
 */
package com.jxc.model.po;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * @author Tino
 * 
 */
@Entity
@Table(name = "RKGL_GOODS_REPERTORY")
public class GoodsRepertory extends IdEntity implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 5115790556382221550L;

	/**
	 * 库存数量
	 * 
	 */
	private Integer num;
	
	/**
	 * 商品
	 * 
	 */
	private Goods goods;

	/**
	 * 所属仓库
	 * 
	 */
	private Repertory repertory;
	
	private Date lastSaleDate;
	
	@Column(name = "LASTSALEDATE")
	public Date getLastSaleDate() {
		return lastSaleDate;
	}

	public void setLastSaleDate(Date lastSaleDate) {
		this.lastSaleDate = lastSaleDate;
	}

	public Integer getNum() {
		return num;
	}

	public void setNum(Integer num) {
		this.num = num;
	}
	
	@ManyToOne
	@JoinColumn(name = "Goods_ID")
	public Goods getGoods() {
		return goods;
	}

	public void setGoods(Goods goods) {
		this.goods = goods;
	}
	
	@ManyToOne
	@JoinColumn(name = "REPERTORY_ID")
	public Repertory getRepertory() {
		return repertory;
	}

	public void setRepertory(Repertory repertory) {
		this.repertory = repertory;
	}

	

}
